<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="model.*" %>  
<%@ page import="dao.*" %>  
<%@ page import="util.*" %>  
<%@ page import="java.sql.*" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="">

    <title>员工页面</title>
    <!-- 引入bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">

 
</head>
<body>
<nav class="navbar navbar-default">
  <a class="navbar-brand" href="#">库存系统--员工</a>
  <div class="container">
  	<ul class="nav navbar-nav">
   		<li><a href="./jinhuo.jsp">进货</a></li>
   		<li><a href="./tuihuo.jsp">退货</a></li>
   		<li><a href="./chuhuo.jsp">出货</a></li>
   		<li><a href="./xiugai.jsp">修改</a></li>
   		<li><a href="../ExitController">退出</a></li>
   	</ul>
  </div>
</nav>
<div style="width:1100px;margin: 0 auto">
<div style="width:500px;float:left;margin-right:100px;">
<table class="table">
	<thead>
		<td>产品Id</td>
		<td>产品代码</td>
		<td>产品名字</td>
		<td>产品价格</td>
		<td>总库库</td>
		<td>可用库库</td>
		<td>更新时间</td>
	</thead>
	<%
	DBUtil util = new DBUtil("select * from product a left join warehouse b on a.PRODUC_ID = b.PRODUC_ID");
	ResultSet rs = null;
	try {
		 rs  = util.pst.executeQuery();
		while(rs.next()){
	%>
	<tr>
		<td><%=rs.getString("PRODUC_ID") %></td>
		<td><%=rs.getString("PRODUC_CODE") %></td>
		<td><%=rs.getString("PRODUC_NAME") %></td>
		<td><%=rs.getString("PRODUC_PRICE") %></td>
		<td><%=rs.getString("TATOL_QUANTITY")==null?"0":rs.getString("TATOL_QUANTITY")%></td>
		<td><%=rs.getString("ENABLE_QUANTITY")==null?"0":rs.getString("ENABLE_QUANTITY") %></td>
		<td><%=rs.getDate("UPDATE_TS")==null?"暂无": rs.getDate("UPDATE_TS")%></td>
	</tr>
	<%
		}
		util.close();
	} catch (SQLException e) {
		util.close();
	}
	%>
</table>
</div>
<div  style="width:500px;float:left">
<form action="../JinhuoController" method="get" >
  <div class="form-group">
    <label for="stockId">进货ID</label>
    <input name="stockId" class="form-control" id="stockId" placeholder="进货ID">
  </div>
  <div class="form-group">
    <label for="stockCode">进货编码</label>
    <input name="stockCode"  class="form-control" id="stockCode" placeholder="进货编码">
  </div>
  <div class="form-group">
    <label for="quantity">数量</label>
    <input name="quantity" class="form-control" id="quantity" placeholder="数量">
  </div>
  <div class="form-group">
    <label for="status">状态</label>
    <input name="status" class="form-control" id="status" placeholder="初始" readonly="true" value="初始">
  </div>
  <div class="form-group">
    <label for="creator">操作人</label>
    <input name="creator" class="form-control" id="creator" placeholder="操作人">
  </div>
  <div class="form-group">
    <label for="productId">产品ID</label>
    <input name="productId" class="form-control" id="productId" placeholder="产品ID">
  </div>
  <button type="submit" class="btn btn-default">提交</button>
</form>
</div>
</div>
</body>
</html>
